package com.zues.daiommiddleware.socket;


import org.java_websocket.client.WebSocketClient;
import org.java_websocket.handshake.ServerHandshake;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.net.URI;

/**
 * @ClassName WebSocketClient
 * @Description TODO
 * @Author Administrator
 * @Date 2023/4/13 17:31
 * @Version 1.0
 **/
public class MsgWebSocketClient extends WebSocketClient {
    private static Logger logger = LoggerFactory.getLogger(MsgWebSocketClient.class);
    public MsgWebSocketClient(URI serverUri) {
        super(serverUri);
    }

    @Override
    public void onOpen(ServerHandshake serverHandshake) {

    }

    @Override
    public void onMessage(String s) {

    }

    @Override
    public void onClose(int i, String s, boolean b) {
        logger.info("收到消息=========="+s);

    }

    @Override
    public void onError(Exception e) {

    }
}
